#include "{{ plugin_name.lower_snake_case }}_impl.h"

namespace mavsdk {

{% if is_server %}
{{ plugin_name.upper_camel_case }}Impl::{{ plugin_name.upper_camel_case }}Impl(std::shared_ptr<ServerComponent> server_component) : ServerPluginImplBase(server_component)
{
    _server_component_impl->register_plugin(this);
}
{% else %}
{{ plugin_name.upper_camel_case }}Impl::{{ plugin_name.upper_camel_case }}Impl(System& system) : PluginImplBase(system)
{
    _system_impl->register_plugin(this);
}

{{ plugin_name.upper_camel_case }}Impl::{{ plugin_name.upper_camel_case }}Impl(std::shared_ptr<System> system) : PluginImplBase(std::move(system))
{
    _system_impl->register_plugin(this);
}
{% endif %}

{{ plugin_name.upper_camel_case }}Impl::~{{ plugin_name.upper_camel_case }}Impl()
{
{% if is_server %}
    _server_component_impl->unregister_plugin(this);
{% else %}
    _system_impl->unregister_plugin(this);
{% endif %}
}

void {{ plugin_name.upper_camel_case }}Impl::init() {}

void {{ plugin_name.upper_camel_case }}Impl::deinit() {}

{% if not is_server %}
void {{ plugin_name.upper_camel_case }}Impl::enable() {}

void {{ plugin_name.upper_camel_case }}Impl::disable() {}
{% endif %}

{% for method in methods %}
{{ method }}
{% endfor %}

} // namespace mavsdk
